package com.ninthgroup.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * fetch data by show
 *
 * @param
 * @create by: 1452863884@qq.com rcg
 * @description:登录日志实体类
 * @create time: 2022/11/3 19:09
 * @return
 */
public class Log {
    private Integer id;

    private String name;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date loginTime;

    private String ip;

    private String tool;


    public Log() {
    }

    public Log(String name, Date loginTime, String ip, String tool) {
        this.name = name;
        this.loginTime = loginTime;
        this.ip = ip;
        this.tool = tool;
    }

    public Log(Integer id, String name, Date loginTime, String ip, String tool) {
        this.id = id;
        this.name = name;
        this.loginTime = loginTime;
        this.ip = ip;
        this.tool = tool;
    }

    /**
     * 获取
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return loginTime
     */
    public Date getLoginTime() {
        return loginTime;
    }

    /**
     * 设置
     * @param loginTime
     */
    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    /**
     * 获取
     * @return ip
     */
    public String getIp() {
        return ip;
    }

    /**
     * 设置
     * @param ip
     */
    public void setIp(String ip) {
        this.ip = ip;
    }

    /**
     * 获取
     * @return tool
     */
    public String getTool() {
        return tool;
    }

    /**
     * 设置
     * @param tool
     */
    public void setTool(String tool) {
        this.tool = tool;
    }

    @Override
    public String toString() {
        return "Log{id = " + id + ", name = " + name + ", loginTime = " + loginTime + ", ip = " + ip + ", tool = " + tool + "}";
    }
}